package org.bear;

import java.util.ArrayList;
import java.util.List;

public class MaxHeap {
    private List<Integer> nodeList;

    public MaxHeap(List<Integer> list){
        this.nodeList=list;

    }

    private void heapify(int nodeIndex){
        int largestIndex = nodeIndex;
        int leftChildIndex = nodeIndex * 2 + 1;
        int rightChildIndex = nodeIndex * 2 + 2;
        if (leftChildIndex < nodeList.size() && nodeList.get(leftChildIndex)>nodeList.get(largestIndex)){
            largestIndex = leftChildIndex;
        }
        if (rightChildIndex <  nodeList.size() && nodeList.get(rightChildIndex)>nodeList.get(largestIndex)){
            largestIndex = rightChildIndex;
        }
        if (largestIndex != nodeIndex){

        }

    }

    private void swap(int i, int j){

    }
}
